package avicit.bdp.dgs.qa.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
import java.util.Map;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2023-07-17
 * @类说明：JobReportDTO
 * @修改记录：
 * @注意事项：
 * @主要功能：质量报告DTO
 */
@ApiModel(value = "JobReportDTO", description = "质量报告DTO")
@Table(name = "bdp_dgs_qa_job_report")
public class JobReportDTO extends BaseDTO {
    /**
     * 主键
     */
    @Id
    @LogField
    @ApiModelProperty(value = "主键")
    @FieldRemark(column = "id", field = "id", name = "id")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 质量作业ID
     */
    @LogField
    @ApiModelProperty(value = "质量作业ID")
    @FieldRemark(column = "job_id", field = "jobId", name = "质量作业ID")
    @Column(name = "job_id")
    private String jobId;

    /**
     * 质量作业名称
     */
    @LogField
    @ApiModelProperty(value = "质量作业名称")
    @FieldRemark(column = "job_name", field = "jobName", name = "质量作业名称")
    @Column(name = "job_name")
    private String jobName;

    /**
     * 流程实例ID
     */
    @LogField
    @ApiModelProperty(value = "流程实例ID")
    @FieldRemark(column = "process_instance_id", field = "processInstanceId", name = "流程实例ID")
    @Column(name = "process_instance_id")
    private String processInstanceId;

    /**
     * 校验结果，0:正常、1：告警、2：--
     */
    @LogField
    @ApiModelProperty(value = "校验结果，0:正常、1：告警、2：--")
    @FieldRemark(column = "job_result_type", field = "jobResultType", name = "校验结果，0:正常、1：告警、2：--")
    @Column(name = "job_result_type")
    private Integer jobResultType;
    @Transient
    private String jobResultTypeName;

    /**
     * 质量评分
     */
    @LogField
    @ApiModelProperty(value = "质量评分")
    @FieldRemark(column = "score", field = "score", name = "质量评分")
    @Column(name = "score")
    private Double score;

    /**
     * 质量报告内容,Map<String,Object>格式
     */
    @LogField
    @ApiModelProperty(value = "质量报告内容,Map<String,Object>格式")
    @FieldRemark(column = "report_json", field = "reportJson", name = "质量报告内容,Map<String,Object>格式")
    @Column(name = "report_json")
    private String reportJson;
    @Transient
    private Map<String, Object> reportMap;

    /**
     * 质量作业定义
     */
    @Transient
    private JobDTO jobDetail;

    /**
     * 校验表信息
     */
    @Transient
    private List<Map<String, Object>> tableInfo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public Integer getJobResultType() {
        return jobResultType;
    }

    public void setJobResultType(Integer jobResultType) {
        this.jobResultType = jobResultType;
    }

    public String getJobResultTypeName() {
        return jobResultTypeName;
    }

    public void setJobResultTypeName(String jobResultTypeName) {
        this.jobResultTypeName = jobResultTypeName;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public String getReportJson() {
        return reportJson;
    }

    public void setReportJson(String reportJson) {
        this.reportJson = reportJson;
    }

    public Map<String, Object> getReportMap() {
        return reportMap;
    }

    public void setReportMap(Map<String, Object> reportMap) {
        this.reportMap = reportMap;
    }

    public JobDTO getJobDetail() {
        return jobDetail;
    }

    public void setJobDetail(JobDTO jobDetail) {
        this.jobDetail = jobDetail;
    }

    public List<Map<String, Object>> getTableInfo() {
        return tableInfo;
    }

    public void setTableInfo(List<Map<String, Object>> tableInfo) {
        this.tableInfo = tableInfo;
    }
}
